<include file="public/header"/>
</head>
<body>
<div style="margin: 15px;">
    <form class="layui-form mt20" action="{:url('Solider/solideredit')}" lay-filter="form1" method="post">
        <div class="layui-input-block mt20">
            <input type="hidden" name="adsid" value="{$info.adsid}">
            <div class="layui-form-item mt10">
                <label class="layui-form-label" for="ads_title">标题</label>
                <div class="layui-input-inline layui-wd2">
                    <input type="text" name="ads_title" id="ads_title" placeholder="标题" autocomplete="off"
                           maxlength="255" value="" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item mt10">
                <label class="layui-form-label" >是否推荐</label>
                <div class="layui-input-inline layui-wd2">
                    <input type="radio" name="state" value="0" title="下架">
                    <input type="radio" name="state" value="1" title="上架" checked>
                </div>
            </div>

            <div class="layui-form-item mt10">
                <label class="layui-form-label">图片路径</label>
                <div class="layui-input-inline layui-wd2">
                    <if condition="$info.soli_image">
                        <img src="{$info.soli_image}" id="up_image_image" style="max-height: 150px">
                        <else/>
                        <img src="__ADMIN__/images/add-img.png" id="up_image_image" style="max-height: 150px">
                    </if>
                    <button type="button" class="layui-btn myImgUpload ml20" id="image"><i class=" layui-icon">
                        &#xe67c;</i>上传图片
                    </button>
                    <input type="hidden" name="soli_image" id="up_input_image" lay-verify="required" value="{$info.soli_image}"/>
                </div>
            </div>

            <div class="layui-input-block mt20">
                <button class="layui-btn layui-btn-danger fr mr100" lay-submit lay-filter="iframebtn">确认保存</button>
            </div>
        </div>
    </form>
</div>
<include file="public/footer"/>
</body>

<script type="text/javascript">
    layui.use(['form', 'layer', 'laydate', 'upload', 'layedit'], function () {
        let form = layui.form,
                laydate = layui.laydate,
                upload = layui.upload,
                layedit = layui.layedit,
                layer = parent.layer === undefined ? layui.layer : top.layer;
        form.val("form1", {
            'ads_title': '{$info.ads_title}',
            'is_href': '{$info.is_href}',
            'href': '{$info.href}',
            'state': '{$info.state}',
            'index_type': '{$info.index_type}',
            'image': '{$info.image}',
            'created_at': '{$info.created_at}',
            'updated_at': '{$info.updated_at}'
        });
    });
</script>
</html>